package com.zmn.plat.persistence.interfaces.appointment.appointmentsetting;

import com.zmn.plat.model.entity.appointment.appointmentsetting.AppointmentSetting;
import com.zmn.plat.model.entity.appointment.appointmentsetting.AppointmentSettingQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * 描述: 预约设置数据库访问
 *
 * @author xujie
 * @since   2020-09-04 16:29:25
 **/
public interface AppointmentSettingDAO {
    /**
     * 描述: 根据id查询数据
     *
     * @param id id
     * @return AppointmentSetting
     * @author xujie
     * @since 2020-09-04 16:29:25
     **/
     AppointmentSetting findById(Integer id);

    /**
     * 描述: 按条件查询数据 支持分页
     *
     * @param query 查询对象
     * @return List<AppointmentSetting>
     * @author xujie
     * @since 2020-09-04 16:29:25
     **/
    List<AppointmentSetting> listPageByQuery(AppointmentSettingQuery query);

    /**
     * 描述: 按条件查询数据 不支持分页
     *
     * @param query 查询对象
     * @return List<AppointmentSetting>
     * @author xujie
     * @since 2020-09-04 16:29:25
     **/
    List<AppointmentSetting> listByQuery(AppointmentSettingQuery query);

    /**
     * 描述: 根据查询条件统计满足条件的数据条数
     *
     * @param query 查询对象
     * @return: Integer
     * @auther: xujie
     * @since: 2020-09-04 16:29:25
     */
    Integer countByQuery(AppointmentSettingQuery query);

    /**
     * 描述: 根据id修改数据 id为必传
     *
     * @param appointmentSetting 待修改数据
     * @return java.lang.Integer
     * @author xujie
     * @since  2020-09-04 16:29:25
     **/
    Integer updateByKey(AppointmentSetting appointmentSetting);

    /**
     * 描述: 根据id批量修改数据 id为必传
     *
     * @param appointmentSettingList 待修改数据集合
     * @return java.lang.Integer 成功个数
     * @author xujie
     * @since  2020-09-04 16:29:25
     **/
    Integer updateBatchByKey(@Param("appointmentSettingList") List<AppointmentSetting> appointmentSettingList);


    /**
     * 描述: 新增数据
     *
     * @param appointmentSetting 待新增数据
     * @return java.lang.Integer 主键key
     * @author xujie
     * @since  2020-09-04 16:29:25
     **/
    Integer insert(AppointmentSetting appointmentSetting);


    /**
     * 描述: 批量新增数据
     * @param appointmentSettingList 待新增数据集合
     * @return java.lang.Integer 成功个数
     * @author xujie
     * @since  2020-09-04 16:29:25
     */
    Integer insertBatch(@Param("appointmentSettingList") List<AppointmentSetting> appointmentSettingList);

    /**
     * 描述: 根据主键删除数据
     *
     * @param id 主键
     * @return: 执行结果码
     * @auther: xujie
     * @since: 2020-09-04 16:29:25
     */
    Integer deleteByKey(Integer id);

}
